package com.koron.ticket.handler;

import cn.afterturn.easypoi.excel.entity.result.ExcelVerifyHandlerResult;
import cn.afterturn.easypoi.handler.inter.IExcelVerifyHandler;
import com.koron.ticket.operation.bean.excelbean.OperationStepTemplate;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 检验excel数据
 */
@Component
public class TalentImportVerifyHandler implements IExcelVerifyHandler<OperationStepTemplate> {

    private final ThreadLocal<List<OperationStepTemplate>> threadLocal = new ThreadLocal<>();

//    @Resource
//    private OperationService operationservice;

    /**
     * 校验数据
     * @param inputEntity
     * @return
     */
    @Override
    public ExcelVerifyHandlerResult verifyHandler(OperationStepTemplate inputEntity) {
        return new ExcelVerifyHandlerResult(true);//默认true 校验交给service做
    }

    public ThreadLocal<List<OperationStepTemplate>> getThreadLocal() {
        return threadLocal;
    }
}
